package com.mdd.admin.validate.comment;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 服务评价参数
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "服务评价参数", description = "服务评价参数")
public class GoodsCommentParam implements Serializable {

    private static final long serialVersionUID = 1L;

    public interface create{}
    public interface update{}
    public interface delete{}

    @NotNull(message = "id参数必传且需大于0", groups = {update.class, delete.class})
    @ApiModelProperty(value = "主键")
    private Long id;

    @NotNull(message = "goodsId参数缺失", groups = {create.class})
    @DecimalMin(value = "0", message = "goodsId参数值不能少于0", groups = {create.class})
    @ApiModelProperty(value = "服务ID")
    private Long goodsId;

    @NotNull(message = "userId参数缺失", groups = {create.class})
    @DecimalMin(value = "0", message = "userId参数值不能少于0", groups = {create.class})
    @ApiModelProperty(value = "用户id")
    private Long userId;

    @NotNull(message = "orderGoodsId参数缺失", groups = {create.class,})
    @DecimalMin(value = "0", message = "orderGoodsId参数值不能少于0", groups = {create.class})
    @ApiModelProperty(value = "订单服务id")
    private Long orderGoodsId;

    @NotNull(message = "serviceComment参数缺失", groups = {create.class})
    @DecimalMin(value = "0", message = "serviceComment参数值不能少于0", groups = {create.class})
    @ApiModelProperty(value = "服务评价")
    private Integer serviceComment;

    @NotNull(message = "comment参数缺失", groups = {create.class})
    @Length(max = 1000, message = "comment参数不能超出1000个字符", groups = {create.class})
    @ApiModelProperty(value = "内容")
    private String comment;

    @NotNull(message = "reply参数缺失", groups = {create.class, update.class})
    @Length(max = 1000, message = "reply参数不能超出1000个字符", groups = {create.class, update.class})
    @ApiModelProperty(value = "回复")
    private String reply;

    @NotNull(message = "status参数缺失", groups = {create.class})
    @DecimalMin(value = "0", message = "status参数值不能少于0", groups = {create.class})
    @ApiModelProperty(value = "状态")
    private Integer status;

}
